<script setup lang='ts'>
import { ref, onMounted } from 'vue'
const props = defineProps<{
    id: number | string
}>()
// 获取岗位
const options1: any = ref([])
onMounted(async () => {
    // const res = await getWorkPlaceApi();
    // console.log(res);
    // res.data.forEach((element: any) => {
    //     options1.value.push({
    //         label: element.v_RiskPartitionName, value: element.id
    //     })
    // });
})
//获取作业场所
// export const getWorkPlaceApi = (params?: object) => {
//     return request({
//         url: '/SMS/SMSDCAnalysisUnit/List',
//         method: 'get',
//         data: params,
//         multiPartFormData: false,
//     } as AxiosRequestConfig);
// }
//详情
// export const getRiskIdentificationApi = (params?: object) => {
//     return request({
//         url: '/SMS/SMSDCRiskIdentificationChange/Detail',
//         method: 'post',
//         data: params,
//         multiPartFormData: false,
//     } as AxiosRequestConfig);
// }
</script>

<template>
    <div style="width: 100%;height: 100%">
        <el-form label-width="120px" ref="ruleFormRef" :model="ruleForm" size="default" :rules="rules">
            <el-divider content-position="left"> 基本信息 </el-divider>
            <el-row :gutter="35">
                <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
                    <el-form-item prop="l_AnalysisUnitId" label="作业活动场所" disabled>
                        <el-select v-model="ruleForm.l_AnalysisUnitId" class="m-2" placeholder="请选择作业活动场所"
                            style="width: 100%">
                            <el-option v-for="item in options1" :key="item.value" :label="item.label"
                                :value="item.value" />
                        </el-select>
                    </el-form-item>
                </el-col>
                <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
                    <el-form-item prop="v_HazardousFactors" label="危害因素">
                        <el-input v-model="ruleForm.v_HazardousFactors" placeholder="岗位风险因素" clearable />
                    </el-form-item>
                </el-col>

                <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
                    <el-form-item prop="v_Event" label="可能导致事故">
                        <el-input v-model="ruleForm.v_Event" placeholder="可能导致事故" clearable />
                    </el-form-item>
                </el-col>
                <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
                    <el-form-item label="风险评价L">
                        <el-input v-model="ruleForm.v_RiskAssessmentL" placeholder="风险评价L" clearable />
                    </el-form-item>
                </el-col>
                <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
                    <el-form-item label="风险评价E">
                        <el-input v-model="ruleForm.v_RiskAssessmentE" placeholder="风险评价E" clearable />
                    </el-form-item>
                </el-col>
                <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
                    <el-form-item label="风险评价C">
                        <el-input v-model="ruleForm.v_RiskAssessmentC" placeholder="风险评价C" clearable />
                    </el-form-item>
                </el-col>
                <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
                    <el-form-item label="风险评价D">
                        <el-input v-model="ruleForm.v_RiskAssessmentD" placeholder="风险评价D" clearable />
                    </el-form-item>
                </el-col>

                <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
                    <el-form-item prop="n_RiskLevel" label="危害因素">
                        <el-input v-model="ruleForm.n_RiskLevel" placeholder="请选择作业活动场所" clearable />
                    </el-form-item>
                </el-col>
                <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
                    <el-form-item prop="v_ControlMeasure" label="风险控制措施">
                        <el-input v-model="ruleForm.v_ControlMeasure" placeholder="风险控制措施" clearable />
                    </el-form-item>
                </el-col>

                <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
                    <el-form-item prop="v_IdentificationPersonnel" label="辨识人员">
                        <el-input v-model="ruleForm.v_IdentificationPersonnel" placeholder="辨识人员" clearable />
                    </el-form-item>
                </el-col>
                <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
                    <el-form-item label="重新复评时间">
                        <el-input v-model="ruleForm.d_ReEvaluationDate" placeholder="重新复评时间" clearable />
                    </el-form-item>
                </el-col>

            </el-row>
        </el-form>
    </div>
</template>

<style scoped></style>